<template>
  <div>
    <el-switch
      :active-text="$t('sys.menu.on')"
      :inactive-text="$t('sys.menu.off')"
      :model-value="!!modelValue"
      active-color="#13ce66"
      inactive-color="#ff4949"
      inline-prompt
      onclick=""
      @change="handlechange"
    />
  </div>
</template>
<script setup lang="ts">
// 定义 props 和 emits
defineProps({
  modelValue: {
    type: Boolean,
    required: true,
  },
});

const emit = defineEmits(['update:modelValue']);
const handlechange = (value: any) => {
  emit('update:modelValue', value);
};
</script>

<style scoped></style>
